import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    
   
    navRoute:[]
  },
  
  mutations: {
    
    
    navCreat(state,val){
      if (!state.navRoute.find(item=>item.name==val.name)) {
        state.navRoute.push(val)
      
      }
      
    },
    deleteNavDataMT(state,val){

    let index=state.navRoute.findIndex(item=>item.name==val)
    state.navRoute.splice(index,1)
    },
    
  },
  actions: {
  
  },
  modules: {
    
  }
})
